﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Drawing;

namespace wicDIG
{
    class ProxyPreferences
    {
        [Category("Marker")]
        public Color PenColor
        {
            get 
            {
                return UtilDig.myPen.Color;
            }
            set
            {
                UtilDig.ChangeColor(value);
            }
        }
        [Category("Marker"),Description("Width of the line and cross.")]
        public float PenWidth
        {
            get
            {
                return UtilDig.myPen.Width;
            }
            set
            {
                UtilDig.ChangeWidth(value);
            }
        }
        [Category("Marker"), Description("Dash style of line and cross.")]
        public System.Drawing.Drawing2D.DashStyle PenDash
        {
            get
            {
                return UtilDig.myPen.DashStyle;
            }
            set
            {
                UtilDig.myPen.DashStyle = value;
            }
        }

        [Category("Marker"), Description("Font of printed point numbers.")]
        public Font TextFont
        {
            get
            {
                return UtilDig.myFont;
            }
            set
            {
                UtilDig.myFont = value;
            }
        }
        [Category("Marker"), Description("How the text is placed when double click.\r\n The special strings are: %number%, %coord%, %break%.")]
        public string TextFormat
        {
            get
            {
                return UtilDig.textFormat;
            }
            set
            {
                UtilDig.textFormat = value;
            }
        }
        [Category("Coordinates"), Description("Increment of the predefined grid.")]
        public float GridLength
        {
            get
            {
                return UtilDig.GridInterval;
            }
            set
            {
                UtilDig.GridInterval = value;
            }
        }
        [Category("Coordinates"), Description("Offset from the numbered grid point to its real coordinate.")]
        public float GridOffset
        {
            get
            {
                return UtilDig.GridOffset;
            }
            set
            {
                UtilDig.GridOffset = value;
            }
        }
        [Category("Coordinates"),Description("How wicDIG sets the coordinates\r\n Orthogonal coordinates need only two points and assume normal orientation.")]
        public CoordStatus CoordinateMode
        {
            get
            {
                return UtilDig.coordMode;
            }
            set
            {
                UtilDig.coordMode = value;
            }
        }
        [Category("Coordinates"), Description("How many digits behind decimal point should wicDIG display.")]
        public int Precision
        {
            get
            {
                return UtilDig.precision;
            }
            set
            {
                UtilDig.precision = value;
            }
        }
        [Category("Coordinates"), Description("A nearest grid coordinate to snap to in coordinate guessing.")]
        public float RoundTo
        {
            get
            {
                return UtilDig.RoundTo;
            }
            set
            {
                UtilDig.RoundTo = value;
            }
        }
        [Category("View"), Description("Show or Hide Board Grid")]
        public bool ShowGrid
        {
            get { return UtilDig.ShowGrid; }
            set { UtilDig.ShowGrid = value;}
        }
        [Category("View"), Description("Mini View Size, in respect to screen, in pixels")]
        public int MiniViewSize
        {
            get { return UtilDig.miniSize; }
            set { UtilDig.miniSize = value; UtilDig.Win.initCustom(); }
        }

        [Category("Extra"), Description("")]
        public string StitchFileName
        {
            get { return UtilDig.stitchFileName; }
            set { UtilDig.stitchFileName = value; }
        }

        [Category("Extra"), Description("")]
        public Color StitchBackground
        {
            get { return UtilDig.stitchBackground.Color; }
            set { UtilDig.stitchBackground = new SolidBrush(value); }
        }
    }
    public enum CoordStatus {Orthogonal,ThreePoints };
}
